<template>
  <div class="right-content-main">
    <div class="header">
      <div class="title">团队信息</div>
      <div class="current-box ">
        <span class="current-text">当前位置</span>
        <span class="line"></span>
        <span class="">
           <router-link to="/#/">首页</router-link>
        </span>
        <span class="line"></span>
        <span v-if="info.title ">
             <router-link to="/teamList">团队介绍</router-link>
        </span>
        <template v-if="info.title ">
          <span class="line"></span>
          <span class="base-text">{{ info.title }}团队</span>
        </template>
      </div>
    </div>
    <div class="content">
       <div class="info" v-html="$TOOL.richTextWithUrls(info.teamIntroduction)"></div>
        <div class="user-info" v-for="item in  info.expertInfos" :key="item.teamId">
           <div class="experts-info" v-for="experts in item.experts">
              <span class="label">{{experts.rank}}：</span>
             <template v-for="(expert,index) in experts.expert" :key="expert.name">
               <span @click="$router.push(`/details?type=4&id=${expert.id}&title=${info.title}团队`)" class="value" >{{expert.name}}</span>
               <span v-if="index!==experts.expert.length-1">、</span>
             </template>
           </div>
        </div>
    </div>
  </div>
</template>

<script setup>

const props = defineProps({
  info: {
    type: Object,
    default: () => {
      return {}
    }
  }
})

</script>

<style scoped lang="scss">
.right-content-main {
  flex: 1;
  min-height: 820px;
  height: 100%;
  background: #FFFFFF;
  .user-info{
    margin: 16px 0;
    .experts-info{
      margin: 16px 0;
      .label{
        color: $base-color;
        font-size: 20px;
        font-weight: bold;
      }
      .value{
        font-size: 16px;
        cursor: pointer;
        &:hover{
          text-decoration: underline;
          color: #3C8BFF;
        }
      }
    }

  }
  .header {
    height: 80px;
    margin: 0 24px;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;

    .current-box {
      display: flex;
      align-items: center;
      color: #333333;
      font-size: 16px;

      span {
        cursor: pointer;

        &:hover {
          font-weight: bold;
          color: $base-color;
          text-decoration: underline;
        }
      }

      .line {
        width: 20px;
        border-bottom: 1px solid #333;
        margin: 0 5px;
      }

      .current-text {
        color: #999;
      }

      .base-text {
        color: $base-color;
      }
    }

    .title {
      position: relative;
      height: 100%;
      padding-top: 16px;
      font-size: 26px;
      font-weight: bold;
      color: $base-color;

      &::after {
        content: '';
        width: 100%;
        border-bottom: 2px solid $base-color;
        position: absolute;
        left: 0;
        bottom: 0;
      }
    }
  }

  :deep(.detail_words) {
    img {
      text-align: center;
      margin-top: 10px;
      margin-bottom: 10px;
    }

    p {
      font-size: 14px;
      color: #666;
      line-height: 32px;
      text-indent: 2em;
    }
  }

  .content {
    padding: 30px;
    .info{
      text-indent: 2em;
      font-size: 16px;
      line-height: 30px;
    }
  }
}
</style>
